package com.woniuxy.article.controller;

import com.hc.entity.Comment;
import com.hc.entity.Paper;
import com.hc.entity.Shop;
import com.hc.utils.ResponseEntity;
import com.woniuxy.article.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 *@ClassName articleController
 *@Description
 *@Author TJ
 *@Date 2022/10/19 15:27
 *@Version 1.0
 **/
@RestController
@RequestMapping("/article")
public class articleController {
    @Autowired
    ArticleService articleService;
   //根据用户输入的字段，模糊查询文章，对比文章点赞数量和评论数，结合地图距离，返回商家信息
    @RequestMapping("/GetHotShop")
    public ResponseEntity<List<Shop>> GetHotShop(String message){
        List<Shop> shops = articleService.getByMessage(message);
        return new ResponseEntity<>("200","ok",shops);
   }
}
 